SetValue - JSONObject

Note: This statement is not available in the Add Statement dialog box or the Statements pane.

Sets or adds a value to a property name in a JSONObject.

Syntax

SetValue("PropertyName", "Value")

Arguments

Argument Description
PropertyName Property in the JSONObject. If the property name is not found, a new property is created.
Value Value to set. Must be a string, integer, float, Boolean, null, JSONObject, or JSONArray. If a JSONObject or JSONArray is used, a copy is created and inserted into the JSONObject.

Supported objects

JSONObject

Example

jsonObject = JSONNewObject()

jsonObject.SetValue("PropertyName1", 1)